import request from "@/api/request";
import type { AxiosResponse } from "axios";


// list
export type GetGearListParams = {
  channel: number | '',
  country: string,
  wd_way: number | '',
  page: number,
  page_size: number
}
export function getGearList(params: GetGearListParams): Promise<AxiosResponse> {
  return request('withdraw/query_withdraw_gear_config', params, 'post')
}

// create
export type CreateGearParams = {
  channel: number,
  country: string,
  wd_way: number,
  token_symbol: string,
  discount: string,
  count: string,
  cash: string,
  status: number
}
export function createGear(params: CreateGearParams): Promise<AxiosResponse>{
  return request('withdraw/create_withdraw_gear_config', params, 'post')
}

// update
export type UpdateGearParams = {
  channel: number,
  country: string,
  wd_way: number,
  token_symbol: string,
  discount: string,
  count: string,
  cash: string,
  status: number,
  gear_id: number
}
export function updateGear(params: UpdateGearParams): Promise<AxiosResponse>{
  return request('withdraw/update_withdraw_gear_config', params, 'post')
}